﻿using LeoK.DCI.Entity;
using System;
using System.Globalization;
using System.Windows.Data;

namespace LeoK.DCI.Converter
{
    public class DCIDiffPrecentConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return ((value as DCI_DayLine).Close - (value as DCI_DayLine).PreClose) / (value as DCI_DayLine).PreClose;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
